﻿using StudySystem.MainLogic.Items;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace StudySystem.MainLogic.FormControl
{
    //用户登录界面控制
    public static class FormUserController
    {
        
        /// <summary>
        /// 用户密码正确调用，隐藏登录界面，打开课程界面
        /// </summary>
        /// <param name="form"></param>
        public static void RightEnter(Form form, List<ClassSubject> subjects)
        {
            form.Hide();//隐藏登录界面
            FormSubject formSubject = new FormSubject(subjects);
            UserManagement.subjects = subjects;
            formSubject.Show();//打开课程界面
        }

        public static void WrongEnter(Form form)
        {
            MessageBox.Show("用户名或密码错误，请重新输入！");
        }

    }
}
